<template>
    
      
        <el-form-item label="">
        <draw-form :FormData="Parameters.FormData" :labels="Parameters.labels" title="订单参数"
          :options="Parameters.options" @submit="handleDrawerSubmit"
          :FormDataType="Parameters.FormDataType"></draw-form>
      </el-form-item>
     
  </template>
  
  <script lang="js">
  import { FormData,FormDataType,options,labels } from '@/data/orderInfoData.js';
import drawForm from '@/Views/common/drawForm.vue';
import  {Message} from "element-ui";
  import orderInfoData from "@/data/orderInfoData";
  import OrderSplitAccountConfig from "@/data/orderprofitsharing";
  export default {
    watch: {
      '$route.name': {
        immediate: true,
        deep: true,
        handler(newValue, oldValue) {
           if (newValue=='orderprofitsharing') {
            this.Parameters  = {...OrderSplitAccountConfig}
          }else {
            this.Parameters  = {...orderInfoData}
          }
        }
      }
    },
    props: {
        handleDrawerSubmit: {
            type: Function,
            default: ()=>{
             alert("我是一个订单")
            },
            required:false
        },
    },
    name: 'commonOrder',
    data() {
      return {
        names: '', // 名称字段
        Parameters:{
            FormData,
            FormDataType,
            options,
            labels
        }
      };
    },
    methods: {
    
    },
    components: {
      drawForm,  
    },
  };
  </script>
  
  <style scoped>
  .common-order {
    padding: 20px;
  }
  </style>